<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>指令及缩写</title>
    <script src="../vue.global.js"></script>
    <style>
        .red{
            color:red;
        }
    </style>
</head>
<body>

<div id="App">
    <div v-html="msg"></div>
    <span v-if="flag">可刚好</span>
    <a :href="url">baidu</a>
    <a :[attriname]="url">baidu</a>

    <button v-on:click="ok(1)">ok</button>
    <button @click="ok(2)">ok</button>
</div>


<script>



    const App = {

        data(){
            return {
                msg:"hello,world",
                flag:false,
                url:"http://www.baidu.com",
                attriname:"href"
            }
        },
        methods:{
            ok(num){
                console.log(num)
            }
        }
    };

    const vm = Vue.createApp(App).mount("#App")


</script>
</body>
</html>